import React, { Component } from 'react'

export default class Child6 extends Component {
    constructor(props){
        super(props);
        this.state={
            name:""
        }
    }
   
  render() {
    return (
      <div>
          <div>
              子组件2需要发送的值：<input ref="name"></input><button onClick={()=>{this.props.add(this.refs.name.value)}}>点击发送给父组件</button>
          </div>
      </div>
    )
  }
}
